One CMakeLists for both the standalone DLL and superbuild static-embed builds - #25
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR restructures dasImguiImplot’s build logic so the same CMakeLists.txt supports both (1) inclusion from a daslang superbuild for static embedding and (2) standalone configuration for producing the .shared_module.
Changes:
- Added a superbuild-vs-standalone split based on whether
ADD_MODULE_CPPis available. - Added an include guard / disable gate for controlling whether the module config executes.
- Implemented superbuild static-embed wiring: globbing
daslib/*.dasfor registration, building module libs, and linking against dasImgui-provided targets.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if(NOT DEFINED DASLANG_DIR) | ||
| message(FATAL_ERROR "DASLANG_DIR must be set to the daslang SDK root") | ||
| endif() | ||
| IF((NOT DAS_IMPLOT_INCLUDED) AND ((NOT ${DAS_IMPLOT_DISABLED}) OR (NOT DEFINED DAS_IMPLOT_DISABLED))) |
Comment on lines
+22
to
+25
| IF(NOT DEFINED imgui_INCLUDE_DIR) | ||
| MESSAGE(FATAL_ERROR "dasImguiImplot superbuild: dasImgui must be included first (imgui_INCLUDE_DIR unset)") | ||
| ENDIF() | ||
| SET(DAS_IMGUI_DIR ${CMAKE_CURRENT_LIST_DIR}/../dasImgui) |
…d builds Both-worlds sweep (after dasVulkan #64 and dasImgui #218): - included from a daslang superbuild (ADD_MODULE_* defined): the module links statically into the host via ADD_MODULE_CPP + ADD_MODULE_LIB; dasImgui -- included earlier in the superbuild's alphabetical modules glob -- provides imgui_INCLUDE_DIR and the libDasModuleImgui target. Every daslib/*.das registers a boost path via a glob, so the glob IS the .das_module register_native_path list and the two can never drift. - configured directly (top-level project, DASLANG_DIR set): the standalone .shared_module flow, content unchanged (locate-dasImgui block and target block verbatim under the standalone branch). Validated: full-external-chain superbuild stub configure (dasImgui -> dasImguiImplot -> dasImguiNodeEditor -> dasVulkan in one include sequence, sibling-vars contract exercised) + standalone desktop configure and full Release build of the .shared_module from the new file. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Also rename the four daslib files to carry their module names (implot_boost_v2.das -> imgui_implot_boost_v2.das etc.): the .das_module registered imgui_-prefixed names over unprefixed file stems, and native-path resolution in a superbuild maps name -> <subfolder>/<name>.das strictly. Found by the fat-man smoke on its first run.
borisbat
force-pushed
the
bbatkin/both-worlds-cmake
branch
from
July 2, 2026 09:03
749ddb4 to
dce30c3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both-worlds sweep, after borisbat/dasVulkan#64 (pilot) and borisbat/dasImgui#218: included from a daslang superbuild (
ADD_MODULE_*defined), the module links statically viaADD_MODULE_CPP+ADD_MODULE_LIB, with dasImgui — included earlier in the superbuild's alphabetical modules glob — providingimgui_INCLUDE_DIRand thelibDasModuleImguitarget; everydaslib/*.dasregisters its boost path via a glob (the glob IS the.das_modulelist, 4/4, no drift possible). Configured directly, the standalone.shared_moduleflow is unchanged.Validated: full-external-chain superbuild stub configure (dasImgui → dasImguiImplot → dasImguiNodeEditor → dasVulkan in one include sequence) + standalone configure and full Release build of the
.shared_modulefrom the new file.No renames, no cross-repo coupling — mergeable on green independent of the dasImgui #218 hold.
🤖 Generated with Claude Code